<div class="container">
	<div class="span-17 main-content">
		<h2 class="group_thread_title"><%= link_to @groups_thread.group.name, @groups_thread.group %> - <%= @groups_thread.title %></h2>
		  
		<table id="messages">
		<% if params[:page] == '1' || params[:page] == nil %>
			<%= render :partial => 'groups_posts/post', :locals => { 	:post => @groups_thread, 
																																:is_thread => 'true', 
																																:edit_path =>edit_groups_thread_path(@groups_thread), 
																																:object_to_delete => @groups_thread } %>
		<% end %>
		
		<% @groups_posts.each do |post| %>
		  <%= render :partial => 'groups_posts/post', :locals => { 	:post => post, 
		  																													:object_to_delete => post, 
		  																													:edit_path => edit_groups_post_path(post), 
		  																													:is_thread => 'false' } %>
		<% end %>
		</table>
		
		<%= paginate @groups_posts %>
			<div class="admin_links">
				<% if logged? %>
					<%= link_to 'Odgovori', new_groups_post_id_path(@groups_thread.id) %>
				<% end %>
				
				<%= link_to 'Natrag', @groups_thread.group %> 
			</div>
	</div>
	
	<%= render 'shared/sidebar'%>
</div>
